<?php
	require_once("db_connect.inc");
	$regione=$_GET['regione'];
	if(isset($regione))
		$query="SELECT * FROM istat_province WHERE codice_regione='".$regione."' ORDER BY nome_provincia";
	else
		$query="SELECT * FROM istat_province  ORDER BY nome_provincia";
	$result=mysql_query($query);
	echo '<option value="SelezionaProvincia">Seleziona Provincia</option>';
	while(($row=mysql_fetch_array($result,MYSQL_ASSOC))){
		echo "<option value='".$row['codice_provincia']."'>".$row['nome_provincia']."</option>";
	}

	mysql_close();


?>